import { 
    ElMessage
} from 'element-plus' ;

export default class{

    #message ;

    #type ;

    #showClose ;

    constructor({
        message,
        type,
        showClose
    }){

        const me = this ;

        me.#type = type ;

        me.#message = message ;

        me.#showClose = showClose ;

    }

    execute(){

        const 
            me = this,
            type = me.#type,
            message = me.#message,
            showClose = me.#showClose;

        if(type){

            ElMessage({
                message,
                type,
                showClose
            }) ;
        
        }else{

            ElMessage(message) ;
        }

        return {
            next:true
        }
    }
}